<template>
    <el-card>
        <div class="home">
            <img :src="userStore.avatar">
            <div class="title">
                <h1>{{ timer() }}<span>{{ userStore.username }}</span></h1>
                <span>欢迎学习vue+element-Plus + Router + vite + TypeScript + pinia</span>
            </div>
        </div>
    </el-card>
</template>

<script setup lang="ts">
import { timer } from '../login/timer';
import { onMounted } from 'vue';
import useCounterStore from '@/store/modules/user';
const userStore = useCounterStore()
onMounted(() => {
    userStore.getUsers()
})

</script>
<script lang="ts">
export default {
    name: 'Home'
}
</script>

<style scoped lang="scss">
.el-card {
    height: 200px;

    .home {
        height: 200px;
        display: flex;

        img {
            height: 150px;
            width: 150px;
            border-radius: 50%;
        }

        .title {
            display: flex;
            flex-direction: column;
            padding-left: 20px;

            h1 {
                font-size: 30px;
                font-weight: bold;
                margin: 30px 0;
            }

            span {
                color: #9acd32;
            }
        }
    }


}
</style>